import {
	http
} from '../httpIndex.js'
export default {
	getFilterStudentPage(params){
		let url = 'app/Student/getFilterStudentPage';
		if(params){
			let entries = Object.entries(params);
			url += '?';
			entries.forEach(item=>{
				if(!item[1]){
					return;
				}
				url=url+item[0]+'='+item[1]+'&'}
			);
			url = url.substring(0,url.length-1);
		}
		return http.get(url);
	},
	//通过班级id查询所有学生信息
	studentList(id) {
		return http.get(`app/Class/getClassStuListByCId?classId=${id}`)
	},
	upStudent(studentId,studentName,studentPhone,parentPhone) {
		return http.get(`app/Class/upStudentById?studentId=${studentId}&studentName=${studentName}&studentPhone=${studentPhone}&parentPhone=${parentPhone}`)
	},
	weekendNotClockInList(id, checkDate) {
		return http.get(`app/Class/getWeekendNotClockInListByCId?classId=${id}&checkDate=${checkDate}`)
	},
	dormitoryUnClockInList(id, checkDate) {
		return http.get(`app/Class/getDormitoryNotClockInListByCId?classId=${id}&checkDate=${checkDate}`)
	},
	getStudentClassAttendancePage(data={}){
		return http.post('app/ClassAttence/getStudentClassAttendances',data);
	}
}
